<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Board Game Software: Board Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Board Game Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">A board game interface w/ 2 game implementations</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Board Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="class_board-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9ee491d4fea680cf69b033374a9fdfcb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a9ee491d4fea680cf69b033374a9fdfcb">Board</a> ()</td></tr>
<tr class="memitem:a064b27e16c35ce92c971b4a8e421d171"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a064b27e16c35ce92c971b4a8e421d171">Board</a> (int row, int col)</td></tr>
<tr class="memitem:af73f45730119a1fd8f6670f53f959e68"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#af73f45730119a1fd8f6670f53f959e68">~Board</a> ()</td></tr>
<tr class="memitem:af23f785e7c9d49271672c79c09cfa4e6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#af23f785e7c9d49271672c79c09cfa4e6">Board</a> (const <a class="el" href="class_board.html">Board</a> &amp;other)</td></tr>
<tr class="memitem:ae6c8d66af1bb70e1d34a704321675975"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_board.html">Board</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#ae6c8d66af1bb70e1d34a704321675975">operator=</a> (const <a class="el" href="class_board.html">Board</a> &amp;other)</td></tr>
<tr class="memitem:a6620ebd560ccf49f4023902f87c22149"><td class="memItemLeft" align="right" valign="top">State&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a6620ebd560ccf49f4023902f87c22149">getBoard</a> () const </td></tr>
<tr class="memitem:a8bd19a32d48ecb8c7736d3caed0175e1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a8bd19a32d48ecb8c7736d3caed0175e1">setBoard</a> (State newBoard)</td></tr>
<tr class="memitem:aca49f093314a104381d05998bbf62f7f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#aca49f093314a104381d05998bbf62f7f">printBoard</a> ()</td></tr>
<tr class="memitem:a6d361394de09ecac862f6e1a4ee736f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a6d361394de09ecac862f6e1a4ee736f3">movePlayer</a> (int player, <a class="el" href="struct_point.html">Point</a> from, <a class="el" href="struct_point.html">Point</a> to)</td></tr>
<tr class="memitem:a1ec07dcac70b8cf8b38f6567bbb0633a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a1ec07dcac70b8cf8b38f6567bbb0633a">isOccupied</a> (<a class="el" href="struct_point.html">Point</a> point)</td></tr>
<tr class="memitem:a2ddb59ae448c0827f0c36c4e3278bef5"><td class="memItemLeft" align="right" valign="top">std::vector&lt; char &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a2ddb59ae448c0827f0c36c4e3278bef5">getRow</a> (int player)</td></tr>
<tr class="memitem:ac4ca39c0e15da6e7f2abb843727f3cac"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="struct_point.html">Point</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#ac4ca39c0e15da6e7f2abb843727f3cac">arrayOfPoints</a> (int player)</td></tr>
<tr class="memitem:a67cf113c045c8aec1565f48eef8e5770"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a67cf113c045c8aec1565f48eef8e5770">initBoard</a> ()</td></tr>
<tr class="memitem:a4b3af55a955cb9d6b86c89ddf729cbb9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a4b3af55a955cb9d6b86c89ddf729cbb9">getPieceRows</a> () const </td></tr>
<tr class="memitem:a0a34732d8ea728be0e39e0712bcc7f08"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a0a34732d8ea728be0e39e0712bcc7f08">setPieceRows</a> (int n)</td></tr>
<tr class="memitem:ab7ac620132ba55e6fc5cbee2cac5dbea"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#ab7ac620132ba55e6fc5cbee2cac5dbea">getRows</a> () const </td></tr>
<tr class="memitem:a169f719f01519b51ff615a8b0dad0309"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a169f719f01519b51ff615a8b0dad0309">getCol</a> () const </td></tr>
<tr class="memitem:a835d87a63eab1ecf2af1e91818403f5d"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_board.html#a835d87a63eab1ecf2af1e91818403f5d">getPieces</a> (int player) const </td></tr>
</table>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a9ee491d4fea680cf69b033374a9fdfcb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_board.html#a9ee491d4fea680cf69b033374a9fdfcb">Board::Board</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructor for the <a class="el" href="class_board.html">Board</a> class </p>

</div>
</div>
<a class="anchor" id="a064b27e16c35ce92c971b4a8e421d171"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_board.html#a9ee491d4fea680cf69b033374a9fdfcb">Board::Board</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>col</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Overloaded constructor for the <a class="el" href="class_board.html">Board</a> class </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">row</td><td><a class="el" href="class_board.html">Board</a> rows </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">col</td><td><a class="el" href="class_board.html">Board</a> columns </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af73f45730119a1fd8f6670f53f959e68"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_board.html#af73f45730119a1fd8f6670f53f959e68">Board::~Board</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Virtual destructor for the <a class="el" href="class_board.html">Board</a> class </p>

</div>
</div>
<a class="anchor" id="af23f785e7c9d49271672c79c09cfa4e6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_board.html#a9ee491d4fea680cf69b033374a9fdfcb">Board::Board</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_board.html">Board</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Copy constructor for the <a class="el" href="class_board.html">Board</a> class </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac4ca39c0e15da6e7f2abb843727f3cac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt; <a class="el" href="struct_point.html">Point</a> &gt; <a class="el" href="class_board.html#ac4ca39c0e15da6e7f2abb843727f3cac">Board::arrayOfPoints</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>player</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Outputs the game board into a <a class="el" href="struct_point.html">Point</a> vector </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">player</td><td>The player to get positions for </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Vector of <a class="el" href="struct_point.html">Point</a> objects for each position on the board </dd></dl>

</div>
</div>
<a class="anchor" id="a6620ebd560ccf49f4023902f87c22149"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">State <a class="el" href="class_board.html#a6620ebd560ccf49f4023902f87c22149">Board::getBoard</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gets current board </p>

</div>
</div>
<a class="anchor" id="a169f719f01519b51ff615a8b0dad0309"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="class_board.html#a169f719f01519b51ff615a8b0dad0309">Board::getCol</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns board columns </p>

</div>
</div>
<a class="anchor" id="a4b3af55a955cb9d6b86c89ddf729cbb9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_board.html#a4b3af55a955cb9d6b86c89ddf729cbb9">Board::getPieceRows</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get how many rows you want for pieces </p>

</div>
</div>
<a class="anchor" id="a835d87a63eab1ecf2af1e91818403f5d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="class_board.html#a835d87a63eab1ecf2af1e91818403f5d">Board::getPieces</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>player</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns piece count for player </p>

</div>
</div>
<a class="anchor" id="a2ddb59ae448c0827f0c36c4e3278bef5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; char &gt; <a class="el" href="class_board.html#a2ddb59ae448c0827f0c36c4e3278bef5">Board::getRow</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>player</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gets a certain row on the board </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">player</td><td>Which player's row to get </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Vector of the row </dd></dl>

</div>
</div>
<a class="anchor" id="ab7ac620132ba55e6fc5cbee2cac5dbea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="class_board.html#ab7ac620132ba55e6fc5cbee2cac5dbea">Board::getRows</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns board rows </p>

</div>
</div>
<a class="anchor" id="a67cf113c045c8aec1565f48eef8e5770"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_board.html#a67cf113c045c8aec1565f48eef8e5770">Board::initBoard</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initialize the game board </p>

</div>
</div>
<a class="anchor" id="a1ec07dcac70b8cf8b38f6567bbb0633a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_board.html#a1ec07dcac70b8cf8b38f6567bbb0633a">Board::isOccupied</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_point.html">Point</a>&#160;</td>
          <td class="paramname"><em>point</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if some location on board is occupied </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">point</td><td>The location </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6d361394de09ecac862f6e1a4ee736f3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_board.html#a6d361394de09ecac862f6e1a4ee736f3">Board::movePlayer</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>player</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_point.html">Point</a>&#160;</td>
          <td class="paramname"><em>from</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_point.html">Point</a>&#160;</td>
          <td class="paramname"><em>to</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Moves player from some location to some location </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">player</td><td>The player </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">From</td><td>location </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">To</td><td>location </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae6c8d66af1bb70e1d34a704321675975"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_board.html">Board</a> &amp; Board::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_board.html">Board</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Assignment operator for the <a class="el" href="class_board.html">Board</a> class </p>

</div>
</div>
<a class="anchor" id="aca49f093314a104381d05998bbf62f7f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_board.html#aca49f093314a104381d05998bbf62f7f">Board::printBoard</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Prints the board </p>

</div>
</div>
<a class="anchor" id="a8bd19a32d48ecb8c7736d3caed0175e1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_board.html#a8bd19a32d48ecb8c7736d3caed0175e1">Board::setBoard</a> </td>
          <td>(</td>
          <td class="paramtype">State&#160;</td>
          <td class="paramname"><em>newBoard</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets current board </p>

</div>
</div>
<a class="anchor" id="a0a34732d8ea728be0e39e0712bcc7f08"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_board.html#a0a34732d8ea728be0e39e0712bcc7f08">Board::setPieceRows</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets how many rows you want for pieces </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_board_8h_source.html">Board.h</a></li>
<li>Board.cpp</li>
</ul>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Sat May 12 2012 04:42:38 for Board Game Software by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
